import { getSupplierBrandInfo } from '../../../../api/index'
import { formatTimeTwo } from '../../../../utils/util'

Page({
  data: {
    supplierBrandId: ''
  },
  async getDetail () {
    try {
      const { ResultSet } = await getSupplierBrandInfo({ supplierBrandId: this.data.supplierBrandId })
      this.setData({ detail: ResultSet.userData.supplierBrandInformation })
    } catch (err) {
      wx.showToast({ title: err.message || err.ResultSet.errors, icon: 'none' })
    }
  },
  onLoad ({ id }) {
    this.setData({ supplierBrandId: id })
    this.getDetail()
  }
})